package com.ulife.order.api;

import com.ulife.common.gateway.utils.annotation.*;
import com.ulife.common.gateway.utils.define.SecurityType;
import com.ulife.common.gateway.utils.entity.ServiceException;
import com.ulife.common.gateway.utils.responseEntity.RawString;
import com.ulife.order.api.errors.OrderErrorCodes;
import com.ulife.order.api.response.OrderStatusInfo;
import com.ulife.order.api.response.SaleOrderInfo;
import com.ulife.order.api.response.ResponseMessage;
import com.ulife.order.api.response.*;
import com.ulife.order.api.response.cms.OrderInfoResponse;

import java.util.List;

/**
 * Created by Ulife on 2015/12/29.
 */
@ApiGroup(minCode = 30000, maxCode = 32100, name = "order", owner = "liuhc", codeDefine = OrderErrorCodes.class)
public interface OrderService {

    @HttpApi(name = "order.page.confirm", desc = "结算页信息", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESSLIST_NOT_FOUND,OrderErrorCodes.PRODUCTDELIVERYLIST_NOT_FOUND,
            OrderErrorCodes.CARTPRODUCT_NOT_FOUND,OrderErrorCodes.COUPONLIST_NOT_FOUND,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND,
            OrderErrorCodes.ORDER_DELIVERYDATES_ERROR,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR})
    ConfirmInfo confirm(@ApiParameter(required = true, name = "items", desc = "商品信息 [{\"itemId\":100893,\"num\":1}]") String item_ids,
                        @ApiParameter(required = false,name = "couponSelfId",desc = "自营优惠券ID") long couponSelfId,
                        @ApiParameter(required = false,name = "couponProviderId",desc = "直送优惠券ID") long couponProviderId
                        ) throws ServiceException;

    @HttpApi(name = "order.DeliveryDates", desc = "获取配送日期", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESSLIST_NOT_FOUND,OrderErrorCodes.PRODUCTDELIVERYLIST_NOT_FOUND})
    DeliverDatesAndPayTypeInfos DeliveryDates(@ApiParameter(required = true, name = "item_ids", desc = "商品id集合 [100893,100893,100893]") String itemIds,
                                          @ApiParameter(required = true, name = "address_id", desc = "地址id") long address_id)  throws ServiceException;

    @HttpApi(name = "order.calculate",desc = "计算订单价格",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.CARTPRODUCT_NOT_FOUND,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR,
            OrderErrorCodes.COUPONLIST_NOT_FOUND,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND})
    ConfirmInfo calculate(@ApiParameter(required = true,name = "items",desc = "商品信息 [{\"itemId\":100893,\"num\":1}]") String items,
                          @ApiParameter(required = true,name = "coupon_self_id",desc = "自营优惠券ID") String coupon_self_id,
                          @ApiParameter(required = true,name = "coupon_provider_id",desc = "直发优惠券ID") String coupon_provider_id) throws  ServiceException;

    @HttpApi(name = "order.create",desc = "创建订单",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.CARTPRODUCT_NOT_FOUND,OrderErrorCodes.ADDRESS_NOT_FOUND,OrderErrorCodes.ADDRESSLIST_NOT_FOUND,
            OrderErrorCodes.GENERATER_ORDER_ERROR,OrderErrorCodes.GENERATER_ORDER_STOCK_ERROR ,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,
            OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND,OrderErrorCodes.COUPONLIST_NOT_FOUND,
            OrderErrorCodes.ORDER_GENERATE_ORDERNO_ERROR,OrderErrorCodes.ORDER_PROMOTION_USE_ERROR,OrderErrorCodes.ORDER_PRODUCT_SERVICE_ERROR,
            OrderErrorCodes.ORDER_DELIVERYDATES_ERROR,OrderErrorCodes.OUT_OF_STOCK_ERROR})
    OrderStatusInfo create(@ApiParameter(required = true,name = "address_id",desc = "地址ID") int address_id,
                           @ApiParameter(required = true,name = "coupon_self_id",desc = "自营优惠券ID，没有传0，不能为空") String coupon_self_id,
                           @ApiParameter(required = true,name = "coupon_provider_id",desc = "直发优惠券ID，没有传0，不能为空") String coupon_provider_id,
                           @ApiParameter(required = false,name = "ship_date",desc = "配送日期") long ship_date,
                           @ApiParameter(required = true,name = "items",desc = "商品信息 [{\"itemId\":100893,\"num\":1}]") String items,
                           @ApiParameter(required = true,name = "pay_type",desc = "货到付款：COD，在线支付：ONLINE") String pay_type) throws  ServiceException;

    @HttpApi(name = "order.groupCreate",desc = "创建团购订单",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESS_NOT_FOUND,OrderErrorCodes.ADDRESSLIST_NOT_FOUND,
            OrderErrorCodes.GENERATER_ORDER_ERROR,OrderErrorCodes.GENERATER_ORDER_STOCK_ERROR ,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,
            OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND,OrderErrorCodes.COUPONLIST_NOT_FOUND,
            OrderErrorCodes.ORDER_GENERATE_ORDERNO_ERROR,OrderErrorCodes.ORDER_PROMOTION_USE_ERROR,OrderErrorCodes.ORDER_PRODUCT_SERVICE_ERROR,
            OrderErrorCodes.ORDER_DELIVERYDATES_ERROR,OrderErrorCodes.OUT_OF_STOCK_ERROR})
    OrderStatusInfo groupCreate(@ApiParameter(required = true,name = "pay_type",desc = "货到付款：COD，在线支付：ONLINE") String pay_type,
                                @ApiParameter(required = true, name = "items", desc = "商品信息 [{\"itemId\":100893,\"num\":1}]") String items,
                                @ApiParameter(required = true, name = "address_id", desc = "地址ID") int address_id,
                                @ApiParameter(required = true, name = "group_id", desc = "团购ID") long group_id,
                                @ApiParameter(required = true, name = "price", desc = "单价") double price)throws ServiceException;

    @HttpApi(name = "order.newCustomerCreate",desc = "拉新订单",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESS_NOT_FOUND,OrderErrorCodes.ADDRESSLIST_NOT_FOUND,
            OrderErrorCodes.GENERATER_ORDER_ERROR,OrderErrorCodes.GENERATER_ORDER_STOCK_ERROR ,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,
            OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND,OrderErrorCodes.COUPONLIST_NOT_FOUND,
            OrderErrorCodes.ORDER_GENERATE_ORDERNO_ERROR,OrderErrorCodes.ORDER_PROMOTION_USE_ERROR,OrderErrorCodes.ORDER_PRODUCT_SERVICE_ERROR,
            OrderErrorCodes.ORDER_DELIVERYDATES_ERROR,OrderErrorCodes.OUT_OF_STOCK_ERROR})
    OrderStatusInfo newCustomerCreate(@ApiParameter(required = true,name = "pay_type",desc = "货到付款：COD，在线支付：ONLINE") String pay_type,
                                      @ApiParameter(required = true, name = "items", desc = "商品信息 [{\"itemId\":100893,\"num\":1,\"price\":10.00,}]") String items,
                                      @ApiParameter(required = true, name = "address_id", desc = "地址ID") int address_id,
                                      @ApiParameter(required = true, name = "orderCategory", desc = "订单类型") String orderCategory,
                                      @ApiParameter(required = true, name = "shipfee", desc = "运费") double shipfee)throws ServiceException;

    @HttpApi(name = "order.OTOCreate",desc = "O2O 订单",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESS_NOT_FOUND,OrderErrorCodes.ADDRESSLIST_NOT_FOUND,
            OrderErrorCodes.GENERATER_ORDER_ERROR,OrderErrorCodes.GENERATER_ORDER_STOCK_ERROR ,OrderErrorCodes.ORDER_CALCULATIONPRODUCT_ERROR,
            OrderErrorCodes.ORDER_CALCULATIONPROMOTIONS_ERROR,OrderErrorCodes.COUPONCALCULATE_NOT_FOUND,OrderErrorCodes.COUPONLIST_NOT_FOUND,
            OrderErrorCodes.ORDER_GENERATE_ORDERNO_ERROR,OrderErrorCodes.ORDER_PROMOTION_USE_ERROR,OrderErrorCodes.ORDER_PRODUCT_SERVICE_ERROR,
            OrderErrorCodes.ORDER_DELIVERYDATES_ERROR,OrderErrorCodes.OUT_OF_STOCK_ERROR})
    OrderStatusInfo OTOCreate(@ApiParameter(required = true, name = "items", desc = "商品信息 [{\"itemId\":100893,\"num\":1,\"price\":10.00,}]") String items)throws ServiceException;



    @HttpApi(name = "order.page.pay",desc = "支付页面信息",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.USERBALANCE_NOT_FOUND, OrderErrorCodes.ORDER_NOT_FOUND,OrderErrorCodes.PAY_CANNOTPAY,OrderErrorCodes.PRODUCTPAYMENT_NOT_FOUND})
    PagePayInfo pagePay(@ApiParameter(required = true,name = "sale_no",desc = "订单号") String sale_no) throws  ServiceException;

    @HttpApi(name = "order.pay", desc = "去支付", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.PAY_PAYERROR, OrderErrorCodes.PAY_CANNOTPAY,OrderErrorCodes.PAY_FAILURE,OrderErrorCodes.USER_NOT_FOUND,
            OrderErrorCodes.USERBALANCE_NOT_FOUND,OrderErrorCodes.USER_DEDUCT_ERROR,OrderErrorCodes.ORDERPAYPROMO_NOT_FOUND})
    PayResponse pay(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no,
                    @ApiParameter(required = false, name = "channel_no", desc = "支付渠道") String channel_no,
                    @ApiParameter(required = false, name = "card_type", desc = "卡类型") String card_type,
                    @ApiParameter(required = false, name = "is_balance", desc = "是否余额支付") boolean is_balance,
                    @ApiParameter(required = false, name = "openid", desc = "微信openid") String openid,
                    @ApiParameter(required = false, name = "return_url", desc = "支付成功返回url") String return_url) throws ServiceException;

    @HttpApi(name = "order.payResult", desc = "支付结果", security = SecurityType.None, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.PAY_FAILURE,OrderErrorCodes.ORDERPAYPROMO_NOT_FOUND,OrderErrorCodes.PAY_FAILURE_CREATE_SOREFUNDBILL_ERROR
    ,OrderErrorCodes.PAY_FAILURE_UPDATE_SALEORDERPAY_ERROR,OrderErrorCodes.PAY_FAILURE_UPDATE_SALEORDER_ERROR})
    ResponseMessage payResult(@ApiParameter(required = false, name = "Amount", desc = "金额") double Amount,
                              @ApiParameter(required = false, name = "OrderId", desc = "订单号") String OrderId,
                              @ApiParameter(required = false, name = "SerialNumber", desc = "支付记录ID") long SerialNumber,
                              @ApiParameter(required = false, name = "TxSerialNumber", desc = "支付序列号") String TxSerialNumber,
                              @ApiParameter(required = false, name = "BankSerialNumber", desc = "银行支付序列号") String BankSerialNumber,
                              @ApiParameter(required = false, name = "OrderType", desc = "支付类型") String OrderType,
                              @ApiParameter(required = false, name = "MerchantId", desc = "平台ID") String MerchantId) throws ServiceException;

    @HttpApi(name = "order.list",desc = "获取主订单列表",security = SecurityType.UserLogin,owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND,OrderErrorCodes.ORDER_INPUT_ERROR})
    SaleOrderListInfo list(
                           @ApiParameter(required = false,name = "statusValue",desc = "订单状态") String statusValue,
                           @ApiParameter(required = false,name ="start_date",desc="订单开始时间")long start_date,
                           @ApiParameter(required = false,name ="end_date",desc="订单开始时间")long end_date,
                           @ApiParameter(required = false,name ="page",desc="第n页")int page,
                           @ApiParameter(required = false,name ="rows",desc="分页条数")int rows) throws ServiceException;

    @HttpApi(name = "order.list.yqf",desc = "获取亿起发订单列表",security = SecurityType.None,owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND,OrderErrorCodes.ORDER_INPUT_ERROR})
    RawString yqf(
            @ApiParameter(required = false,name = "orderNo",desc = "订单号") String orderNo,
            @ApiParameter(required = false,name = "cid",desc = "活动ID") String cid,
            @ApiParameter(required = false,name ="updateStartTime",desc="订单更新开始时间")long updateStartTime,
            @ApiParameter(required = false,name ="updateEndTime",desc="订单更新结束时间")long updateEndTime,
            @ApiParameter(required = false,name ="orderStartTime",desc="订单生成开始时间")long orderStartTime,
            @ApiParameter(required = false,name ="orderEndTime",desc="订单生成结束时间")long orderEndTime) throws ServiceException;

    @HttpApi(name = "order.detail", desc = "获取主订单详情", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND,OrderErrorCodes.ORDERDETAILPROMO_NOT_FOUND})
    SaleOrderInfo detail(@ApiParameter(required = true, name = "sale_no", desc = "主订单号") String sale_no) throws ServiceException;

    @HttpApi(name = "order.logistics.tracking", desc = "订单配送信息", security = SecurityType.None, owner = "dangpb")
    List<TrackingInfo> tracking(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no,
                                @ApiParameter(required = false, name = "ship_order_no", desc = "包裹号") String ship_order_no) throws ServiceException;

    @HttpApi(name = "order.count",desc = "订单个数",security = SecurityType.UserLogin,owner = "dangpb")
    int count(@ApiParameter(required = false,name = "status",desc = "订单状态") String status,
              @ApiParameter(required = false,name ="start_date",desc="订单开始时间")long start_date,
              @ApiParameter(required = false,name ="end_date",desc="订单开始时间")long end_date) throws  ServiceException;

    @HttpApi(name = "order.cancel", desc = "取消订单（支持未支付订单、部分支付订单，为成团订单取消）", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND, OrderErrorCodes.ORDER_STATUS_ERROR,OrderErrorCodes.ORDER_REFUNDAMOUNT_ERROR})
    OrderStatusInfo cancel(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no) throws ServiceException;

    @HttpApi(name = "order.fristOrder", desc = "获取首单", security = SecurityType.None, owner = "dangpb")
    String fristOrder(@ApiParameter(required = true, name = "customer_id", desc = "用户id") long customer_id) throws ServiceException;
    //--------------------------------------------下面是内部调用的接口-------------------------------------------------------------

    @HttpApi(name = "order.cancel.internal", desc = "取消订单(内部操作)",security=SecurityType.None, owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND, OrderErrorCodes.ORDER_STATUS_ERROR,OrderErrorCodes.ORDER_REFUNDAMOUNT_ERROR})
    OrderStatusInfo internalCancel(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no,
                                   @ApiParameter(required = false, name = "operator_id", desc = "操作人") String operator_id,
                                   @ApiParameter(required = false, name = "action_code", desc = "操作code 【团购：GroupFailed】") String actionCode) throws ServiceException;

    @HttpApi(name = "order.stock.holding", desc = "订单商品预占库存", security = SecurityType.Internal, owner = "liuhc")
    List<OrderSkuStock> stockHolding() throws ServiceException;

    @HttpApi(name = "order.groupResult",desc = "成团结果通知",security = SecurityType.Internal,owner = "dangpb")
    GroupResultInfo groupResult(@ApiParameter(required = true,name = "group_id",desc = "团购ID") long group_id) throws  ServiceException;

    //--------------------------------------------下面是服务的接口-------------------------------------------------------------

    @HttpApi(name = "order.daliyLimitCache", desc = "配送单量缓存", security = SecurityType.None, owner = "dangpb")
    boolean DaliyLimitCache() throws ServiceException;

    @HttpApi(name = "order.sync", desc = "同步订单状态&物流跟踪信息", security = SecurityType.Internal, owner = "liuhc")
    String sync() throws ServiceException;

    @HttpApi(name = "order.split", desc = "拆分子订单", security = SecurityType.Internal, owner = "liuhc")
    String split() throws ServiceException;

    @HttpApi(name = "order.autoCancel", desc = "自动取消超时未支付订单", security = SecurityType.Internal, owner = "liuhc")
    String autoCancel() throws ServiceException;

    @HttpApi(name = "order.push", desc = "推送订单至OM", security = SecurityType.Internal, owner = "liuhc")
    String push() throws ServiceException;

   //--------------------------------------------下面是暂时不用的接口-------------------------------------------------------------

    @HttpApi(name = "order.confirmSub", desc = "确认子订单", security = SecurityType.Internal, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND, OrderErrorCodes.ORDER_STATUS_ERROR})
    OrderStatusInfo confirmSub(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no) throws ServiceException;

    @HttpApi(name = "order.batchConfirmSub", desc = "批量确认子订单", security = SecurityType.Internal, owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_SHIPPING_DATE_ILLEGAL})
    ResponseMessage batchConfirmSub(@ApiParameter(required = true, name = "shipping_date", desc = "配送日期") long shipping_date,
                                    @ApiParameter(required = true, name = "modify_by", desc = "修改人") String modify_by) throws ServiceException;

    @HttpApi(name = "order.modifySubItem", desc = "修改子订单菜品", security = SecurityType.None, owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    ResponseMessage modifySubItem(@ApiParameter(required = true, name = "shipping_date", desc = "配送日期") long shipping_date,
                                  @ApiParameter(required = true, name = "modify_by", desc = "修改人") String modify_by) throws ServiceException;

    @HttpApi(name = "order.suspend", desc = "暂停主订单配送", security = SecurityType.Internal, owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    ResponseMessage suspendOrder(@ApiParameter(required = true, name = "no", desc = "主订单号") String no,
                                 @ApiParameter(required = true, name = "modify_by", desc = "修改人") String modify_by) throws ServiceException;

    @HttpApi(name = "order.batchCreateSub", desc = "批量创建子订单", security = SecurityType.Internal, owner = "liuhc")
    @DesignedErrorCode({OrderErrorCodes.ORDER_SHIPPING_DATE_ILLEGAL})
    ResponseMessage batchCreateSub(@ApiParameter(required = true, name = "shipping_date", desc = "配送日期") long shipping_date,
                                   @ApiParameter(required = true, name = "modify_by", desc = "修改人") String modify_by) throws ServiceException;

    @HttpApi(name = "order.modifyStatus", desc = "修改订单状态", security = SecurityType.None, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    OrderStatusInfo modifyOrderStatus(@ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no,
                                      @ApiParameter(required = true, name = "status", desc = "订单状态") int status) throws ServiceException;

    @HttpApi(name = "order.subDetail", desc = "获取子订单详情", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    SaleOrderInfo subDetail(@ApiParameter(required = true, name = "sale_no", desc = "子订单号") String sale_no) throws ServiceException;

    @HttpApi(name = "order.subList", desc = "获取子订单列表", security = SecurityType.UserLogin, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND, OrderErrorCodes.ORDER_INPUT_ERROR})
    List<SaleOrderInfo> subList(@ApiParameter(required = true, name = "customer_id", desc = "用户ID") long customer_id,
                                @ApiParameter(required = true, name = "package_sale_no", desc = "主订单单号") String package_sale_no,
                                @ApiParameter(required = true, name = "status", desc = "订单状态") int status,
                                @ApiParameter(required = true, name = "start_date", desc = "订单开始时间") long start_date,
                                @ApiParameter(required = true, name = "end_date", desc = "订单开始时间") long end_date,
                                @ApiParameter(required = true, name = "page", desc = "第n页") int page,
                                @ApiParameter(required = true, name = "pagesiz", desc = "分页条数") int pagesiz) throws ServiceException;

    @HttpApi(name = "order.modifyAddress", desc = "修改订单地址", security = SecurityType.None, owner = "dangpb")
    @DesignedErrorCode({OrderErrorCodes.ADDRESS_NOT_FOUND})
    AddressInfo modifyOrderAddress(@ApiParameter(required = true, name = "address_id", desc = "地址ID") int address_id,
                                   @ApiParameter(required = true, name = "sale_no", desc = "订单号") String sale_no) throws ServiceException;


    @HttpApi(name = "order.nonepayorder", desc = "获取指定商品ID的未付款信息,检查O2O限购用", security = SecurityType.None, owner = "HuBin")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    OrderCommResponse findNonePayOrderByCustomerIdAndItemId(@ApiParameter(required = true, name = "customerId", desc = "用户ID") long customerId,
                                   @ApiParameter(required = true, name = "itemId", desc = "商品号") String itemId) throws ServiceException;

    /**
     * 部分支付订单取消（退款：仅余额的部分支付）
     * @param sale_no 订单编号
     * @throws ServiceException
     */
    //@HttpApi(name = "order.partialPayCancel", desc = "（暂时不用）部分支付订单取消（订单状态：支付方式必须为余额支付）", security = SecurityType.UserLogin, owner = "luohx")
//    @DesignedErrorCode({OrderErrorCodes.PartialPayOrderCANCEL_ERROR,
//            OrderErrorCodes.PartialPayOrderCANCEL_ERROR_NoneBalancePay,
//            OrderErrorCodes.PartialPayOrderCANCEL_ERROR_PaidUnequal })
//    RefundResultInfo partialPayCancel(
//            @ApiParameter(required = true, name = "sale_no", desc = "订单编号") String sale_no) throws ServiceException;

    @HttpApi(name = "order.cms.list", desc = "检索订单列表（内部管理使用）", security = SecurityType.None, owner = "luohx")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    SaleOrderListInfo getOrderList(
            @ApiParameter(required = false, name = "start_date", desc = "订单创建开始时间") long start_date,
            @ApiParameter(required = false, name = "end_date", desc = "订单创建结束时间") long end_date,
            @ApiParameter(required = false, name = "sale_no", desc = "主单号") String sale_no,
            @ApiParameter(required = false, name = "ship_no", desc = "发货单号") String ship_no,
            @ApiParameter(required = false, name = "consignee_name", desc = "收货人名称") String consignee_name,
            @ApiParameter(required = false, name = "consignee_mobile_no", desc = "收货人手机号") String consignee_mobile_no,
            @ApiParameter(required = false, name = "login_name", desc = "客户账号") String login_name,
            @ApiParameter(required = false, name = "page", desc = "页码",defaultValue = "1") int page,
            @ApiParameter(required = false, name = "rows", desc = "每页条数",defaultValue = "10") int rows
    ) throws ServiceException;

    @HttpApi(name = "order.cms.orderItems", desc = "检索订单明细（内部管理使用）", security = SecurityType.None, owner = "luohx")
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    List<ItemInfo> getOrderItems(@ApiParameter(required = true, name = "sale_no", desc = "订单编号")String sale_no);

    @HttpApi(name = "order.cms.orderPayList", desc = "检索订单支付明细（内部管理使用）", security = SecurityType.None, owner = "luohx")
    List<SaleOrderPayInfo> getOrderPayItems(@ApiParameter(required = true, name = "sale_no", desc = "订单编号") String sale_no);

    @HttpApi(name = "order.cms.detail",desc = "订单详情（内部管理使用）",owner = "liaodp", security = SecurityType.None)
    @DesignedErrorCode({OrderErrorCodes.ORDER_NOT_FOUND})
    OrderInfoResponse getOrderInfo(@ApiParameter(required = true, name = "saleNo", desc = "订单号") String saleNo)throws ServiceException;
}